txt = "Good night Sam!";

x = "mSa";
y = "eJo";
z = "odnght";

print(txt.maketrans(x, y, z));
